/**
 * @(#)com.framework.controller.demo.IndexController
 *
 * Copyright (c) 2014-2018 上海纬视瑞科技有限公司
 *
 * DESC:
 *
 */
package com.framework.controller.demo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author fusf
 * @version 1.0  2017/1/23
 */
@Controller
public class IndexController {


    /**
     * 统一的页面跳转
     *
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/")
    public ModelAndView index(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.setAttribute("message","这是一个消息");
        ModelAndView modelAndView = new ModelAndView("index");
        return modelAndView;
    }

}
